/** 
 * @file
 * @description 公共组件注册文件 
 */

import {
    Button,
    Table,
    Pagination,
    Tree,
    Form,
    FormItem,
    Card,
    Input,
    Menu,
    MenuItem,
    MessageBox,
    Message,
    Breadcrumb,
    BreadcrumbItem,
    MenuItemGroup,
    Submenu,
    Result,
    TableColumn,
    Alert,
    Select,
    Tabs,
    TabPane,
    Switch,
    Dialog,
 
    Option,
    Loading
} from "element-ui";

import { confirm } from "uti/common";
import {myConfirm} from "com/MyConfirm/index";
// import { myConfirm } from "@/components/MyConfirm/index";
import MyDialog from '@/components/MyConfirm/Dialog';
import Mytable from 'com/Table';
import  Search from 'com/Search';
import MyForm from 'com/Form';
// const MyConfirm
export default {
    install(Vue) {
        Vue.prototype.$myConfirm=myConfirm;
        Vue.prototype.$mb = MessageBox;
        Vue.prototype.$m = Message;
        [MyDialog,Mytable,Search,MyForm].forEach(item=>Vue.component(item.name,item));
        Vue.prototype.$confirm=confirm;
 
        [
            Breadcrumb,
            BreadcrumbItem,
            Button,
            Table,
            Pagination,
            Tree,
            Form,
            FormItem,
            Input,
            Menu,
            MenuItem,
            MenuItemGroup,
            Submenu,
            Result,
            Card,
            TableColumn,
            Alert,
            Select,
            Tabs,
            TabPane,
            Switch,
            Dialog,
            Loading,
            Option
          
        ].forEach(item => Vue.use(item));
    }
}
